$(function () {
	vm.getInfo(getQueryString("id"));
});

var vm = new Vue({
	el:'#mapp',
	data:{
		title: "编辑快报",
		bsnKb: {}
	},
	methods: {
		saveOrUpdate: function () {
			if (StringUtils.isEmpty(vm.bsnKb.biaoti)) return;
			
			$.ajax({
				type: "POST",
			    url: ajaxServerUrlG("bsnKb/save"),
                contentType: "application/json",
			    data: JSON.stringify(vm.bsnKb),
			    success: function(r){
			    	if(r.code === 0){
						alert('操作成功');
					}else{
						alert(r.msg);
					}
				}
			});
		},
		getInfo: function(id){
			if (StringUtils.isEmpty(id)) return;
			
			var thisUrl = ajaxServerUrlG("bsnKb/info/" + id);
			$.get(thisUrl, function(r){
					if(r.code === 0){
                		vm.bsnKb = r.bsnGonggao;
					}else{
						alert(r.msg);
					} 
            });
		}
	}
});